/**
 * Project: IMPAuto SDK
 * Company: NavInfo Co.,Ltd.
 * All rights reserved
 * (c) Copyright 2020
 */

#ifndef __IMP_AUTO_HPP__
#define __IMP_AUTO_HPP__

#include <string>
#include <functional>
#include "Common.hpp"
/**
 * @brief Navinfo namespace
 * 
 */
namespace Navinfo {
/**
 * @brief IMPAuto namespace
 * 
 */
namespace IMPAuto {


/**
 * @brief SDKControl is responsible for maintainance the lifecycle of the whole SDK.
 * 
 */
class SDKControl
{
protected:
    virtual ~SDKControl() {};
public:
    /**
     * @brief Get the version information.
     * 
     * @param version   version string.
     * @return RETURN_CODE 
     */
    virtual IMPAuto::Common::RETURN_CODE GetVersion(std::string &version) = 0;

    /**
     * @brief Config AutoSDK with configuration file.
     * 
     * @param IniPath   Path to config ini file.
     * @return RETURN_CODE 
     */
    virtual IMPAuto::Common::RETURN_CODE Config(const std::string &IniPath) = 0;

    /**
     * @brief Start AutoSDK.
     *        This should be called after correctly config.
     * 
     * @return RETURN_CODE 
     */
    virtual IMPAuto::Common::RETURN_CODE Start() = 0;

    /**
     * @brief Stop and release AutoSDK.
     * 
     * @return RETURN_CODE 
     */
    virtual IMPAuto::Common::RETURN_CODE Release() = 0;
};

} // namespace IMPAuto
} // namespace Navinfo


/**
 * @brief Get SDKControl pointer. This is a global singleton instance. It will be released at the end of lifetime.
 * 
 */
extern "C" DLL_PUBLIC Navinfo::IMPAuto::SDKControl* CreateIMPAutoSDK();

#endif //__IMP_AUTO_HPP__
